package frontend.lexer;

public enum TKType {
    IDENFR("Ident", "IDENFR"),
    INTCON("IntConst", "INTCON"),
    STRCON("StringConst", "STRCON"),
    CHRCON("CharConst", "CHRCON"),
    MAINTK("main", "MAINTK"),
    CONSTTK("const", "CONSTTK"),
    INTTK("int", "INTTK"),
    CHARTK("char", "CHARTK"),
    BREAKTK("break", "BREAKTK"),
    CONTINUETK("continue", "CONTINUETK"),
    IFTK("if", "IFTK"),
    ELSETK("else", "ELSETK"),
    NOT("!", "NOT"),
    AND("&&", "AND"),
    OR("||", "OR"),
    FORTK("for", "FORTK"),
    GETINTTK("getint", "GETINTTK"),
    GETCHARTK("getchar", "GETCHARTK"),
    PRINTFTK("printf", "PRINTFTK"),
    RETURNTK("return", "RETURNTK"),
    PLUS("+", "PLUS"),
    MINU("-", "MINU"),
    VOIDTK("void", "VOIDTK"),
    MULT("*", "MULT"),
    DIV("/", "DIV"),
    MOD("%", "MOD"),
    LSS("<", "LSS"),
    LEQ("<=", "LEQ"),
    GRE(">", "GRE"),
    GEQ(">=", "GEQ"),
    EQL("==", "EQL"),
    NEQ("!=", "NEQ"),
    ASSIGN("=", "ASSIGN"),
    SEMICN(";", "SEMICN"),
    COMMA(",", "COMMA"),
    LPARENT("(", "LPARENT"),
    RPARENT(")", "RPARENT"),
    LBRACK("[", "LBRACK"),
    RBRACK("]", "RBRACK"),
    LBRACE("{", "LBRACE"),
    RBRACE("}", "RBRACE"),
    TK_EOF("eof", "TK_EOF"),
    TK_ERR("", "TK_ERR");



    TKType(String tk, String tktype) {
        this.tk = tk;
        this.tktype = tktype;
    }
    //代码片段
    private final String tk;
    //token类型
    private final String tktype;

    public String getTk() {
        return tk;
    }

    public String getTktype() {
        return tktype;
    }

}
